feat(Feature Lifecycle): Update API with feature lifecycle info#7789
feat(Feature Lifecycle): Update API with feature lifecycle info#7789emyller wants to merge 24 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
613356f to
69b78cd
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7789 +/- ##
==========================================
- Coverage 98.59% 98.55% -0.05%
==========================================
Files 1472 1482 +10
Lines 57370 58045 +675
==========================================
+ Hits 56564 57204 +640
- Misses 806 841 +35 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
3bbd50f to
e75211b
Compare
Match the feature-lifecycle endpoints introduced in PR #7789: - lowercase LifecycleStage values + SECTION_TO_STAGE mapping - env-scoped counts URL (environments/{env}/feature-lifecycle-counts/) - read lowercase count keys; drop unsupported filter + evaluation_period params from the counts query - remove the orphaned evaluation-period selector (backend derives the window from project.stale_flags_limit_days) Extract prod-environment prediction into predictProdEnvironment(). Add frontend context doc for running an unmerged backend PR's Docker image. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
khvn26
left a comment
There was a problem hiding this comment.
The code was pretty easy to read through, good job. Just a handful of questions/comments.
| # NOTE: This field is populated by `features.feature_lifecycle.services.annotate_feature_queryset_with_lifecycle_stage`. | ||
| lifecycle_stage = serializers.ChoiceField( | ||
| choices=list(LifecycleStage), | ||
| read_only=True, | ||
| ) |
There was a problem hiding this comment.
- Do we have an idea of how this will affect influx usage in SaaS prod?
- Do we have an idea of the latency hit for the dashboard?
There was a problem hiding this comment.
No I don't have numbers for SaaS prod. The plan is to gradually roll this out to a few who're interested in trying it out, and collect real metrics.
On my local benchmarking, added latency is negligible (30K features + simulated usage + code references).
There was a problem hiding this comment.
Can you add the results to the PR description? This is a fairly critical path I expect us to include in our SLOs someday.
There was a problem hiding this comment.
I suppose it's obvious to expect we'll need to learn from observation and tweak as needed. I deem current numbers are not perfect, but I'd rather not try to optimise early.
Co-authored-by: Kim Gustyr <[email protected]>
This reverts commit 2d75b64.
I have added information todocs/if required so people know about the feature.Changes
Closes #7433
/api/v1/environments/{environment}/feature-lifecycle-counts/{ "NEW": 475, "LIVE": 734, "PERMANENT": 190, "STALE": 374, "NEEDS_MONITORING": 30, "TO_REMOVE": 197 }GET /api/v1/projects/{project_pk}/features/(list):lifecycle_stage: one of stages below; requiresenvironment.lifecycle_stageto the above list endpoint, and also to.../{feature_id}(retrieve), also carrying one of stages below.Stages logical propositions are as follows:
PERMANENThas_permanent_tagLIVE~has_permanent_tag AND ~has_stale_tag AND has_code_referencesNEW~has_permanent_tag AND ~has_stale_tag AND ~has_code_referencesSTALE~has_permanent_tag AND has_stale_tag AND has_code_referencesNEEDS_MONITORING~has_permanent_tag AND has_stale_tag AND ~has_code_references AND evaluated_recentlyTO_REMOVE~has_permanent_tag AND has_stale_tag AND ~has_code_references AND ~evaluated_recentlyHow did you test this code?
How to review
Reviewing is easier if you split: